package com.qin.service.impl;

import java.util.List;

import com.qin.dao.CommentDao;
import com.qin.entity.Comment;
import com.qin.service.CommentService;

public class CommentServiceImpl implements CommentService {

	private CommentDao commentDao = new CommentDao(); 
	@Override
	public Long insertComment(Comment comment) {
		return commentDao.insertComment(comment);
	}

	@Override
	public int updateComment(Long id, String content) {
		return commentDao.updateComment(id, content);
	}

	@Override
	public int logicDeletComment(Long id) {
		return commentDao.logicDeleteComment(id);
	}

	@Override
	public Comment queryCommentById(Long id) {
		return commentDao.queryCommentById(id);
	}

	@Override
	public List<Comment> queryCommentByBookId(Long id) {
		return commentDao.queryAllCommentByBookId(id);
	}

}
